#!/bin/bash

trainset="$1"
testset="$2"

params=('2' '2 3 4 5 6' '2 3 4 5 6' '0.001 0.01 0.1 1 5 10')

accfile=pred.acc
rocfile=pred.roc

rm $accfile $rocfile

for b in 1 10 20 30
do
    for g in 0 0.01 0.1 0.5 1
    do
        for t in 10 20 30
        do
            for k in 0 1 2 3
            do
                for p in ${params[$k]}
                do
                    sig="-b=$b-g=$g-t=$t-k=$k-p=$p"
                    echo "training model with -b $b -g $g -t $t -k $k -p $p"
#                    ./vplearn -b $b -g $g -t $t -k $k -p $p -m model$sig $trainset
#                    echo "testing model"
#                    ./vpclassify -m model$sig -o pred$sig $testset
#                    echo -n "$sig-voted " >> $accfile
#                    colex 1 2 < pred$sig | perf -ACC -t 0 >> $accfile
#                    echo -n "$sig-avg " >>  $accfile
#                    colex 1 3 < pred$sig | perf -ACC -t 0 >> $accfile
#                    echo -n "$sig-voted " >> $rocfile 
#                    colex 1 2 < pred$sig | perf -ROC >> $rocfile
#                    echo -n "$sig-avg " >> $rocfile
#                    colex 1 3 < pred$sig | perf -ROC >> $rocfile
                done
            done
        done
    done
done
